package ;
import haxe.Http;
import haxe.Template;
import hxjson2.JSON;
import js.Lib;
import net.exprom.qe.QECore;
import net.exprom.qe.QEStack;
//import net.exprom.qe.QEModel;

/**
 * ...
 * @author Gilles Coomans
 */

class Main 
{
	public var json:JSON;
	public var http:Http;
	public var template:Template;
	public var mdc:QECore;
	
	static function main() 
	{
		
	}
	
	static public function isString(s:Dynamic):Bool
	{
		return Std.is(s, String);
	}
	
	static public function resolveObject(name:String):Dynamic
	{
		#if js
		return Lib.eval(name);
		#end
	}
	
	static public function isQESatck(s:Dynamic):Bool
	{
		if (Type.getClass(s) == QEStack)
			return true;
		var sc = Type.getSuperClass(Type.getClass(s));
		while (sc != null)
		{
			if (sc == QEStack)
				return true;
			sc = Type.getSuperClass(sc);
		}
		return false;
	}
}